import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
// import 'package:cached_network_image/cached_network_image.dart';

class ImageUtils {

  static String getImgPath(String name, {String format: 'png'}) {
    return 'assets/images/$name.$format';
  }

  //cached_network_image库只适用于android ios平台
  // static ImageProvider getImageProvider(String imageUrl, {String holderImg: "none"}){
  //   if (TextUtil.isEmpty(imageUrl)){
  //     return AssetImage(getImgPath(holderImg));
  //   }
  //   return CachedNetworkImageProvider(imageUrl);
  // }
}

